package com.newInstance.site.tags;

import java.io.File;
import java.io.IOException;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.jsp.tagext.TagSupport;
public class LastModifiedTagTs extends TagSupport {
	public int doEndTag() {
	      try {
	        HttpServletRequest request =
	(HttpServletRequest)pageContext.getRequest();
	        String path = pageContext.getServletContext().getRealPath(
	          request.getServletPath());
	        File file = new File(path);
	        DateFormat formatter = DateFormat.getDateInstance(
	          DateFormat.LONG);
	        pageContext.getOut().println(
	          formatter.format(new Date(file.lastModified())));
	      } catch (IOException ignored) { }
	      return EVAL_PAGE;
	    }
	public static void main(String [] arg){
		
	}
}
